<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="styles.css" />
<title>收货地址列表</title>
<script type="text/javascript" src="jquery-1.8.0.min.js"></script>
<script type="text/javascript">
$(function(){
	$(".def").click(function(){
		var a = $(this);
		var rId = a.attr("rId");
		$.get("SetDefaultServlet", {rId: rId}, function(){
			//相当于打开：SetDefaultServlet?aid=aid
			location.reload();//刷新页面
			//a.remove();
		});
	});
});
</script>
</head>
<body style="min-width: 980px;">
	<div id="main_top">
		<jsp:include page="headarea.jsp"></jsp:include>
	</div>
	<div class="header_wrape">
		<div class="navwrape">
			<div id="nave">
				<div class="navbare clearfix">
					<a class="currente" href="menu_listservlet">首页</a> <a href="Close_List">衣服</a> <a
						href="Shose_List"">鞋靴</a> <a href="Pant_List">裤子</a>
				</div>
			</div>
		</div>
	</div>
	<div class="block box">
		<div class="blank"></div>
		<div id="ur_here">
			当前位置: <a href="menu_listservlet">首页</a>
			<code>&gt;</code>
			收获地址
		</div>
	</div>
	<div>
		<div id="main_middle_left">
			<jsp:include page="left.jsp">
				<jsp:param value="3" name="index" />
			</jsp:include>
		</div>
		<div id="main_middle_right">
			<div class="AreaR">
				<div class="box">
					<div class="box_1">
						<div class="userCenterBox boxCenterList clearfix"
							style="_height: 1%;">
							<h5>
								<span>收货人地址->添加收获地址</span>
							</h5>
							<div class="btn_area">
								<a class="btn-b" href="receving.jsp">新增地址</a>
							</div>
							<table class="tab_list" >
								<tr>
									<th>详细地址</th>
									<th>收货人</th>
				                 	<th>邮政编码</th>
									<th>手机号码</th>
									<th>操作</th>
								</tr>
								<c:forEach items="${list}" var="r">
									<tr>
										<td>${r.rReceivingaddress}</td>
										<td>${r.rName}</td>
										<td>${r.rPostCard}</td>
										<td>${r.rPhone}</td>
										<td>
										     <c:if test="${not r.moren}">
												<a class="def"  rId="${r.rId}" href="javascript:void(0)"><img src="images/默认.png"  valign="middle" title="设为默认"/></a>
												<a href="Init_receiving?rId=${r.rId}&curpage=${param.curpage}"><img src="images/修改.png"  valign="middle" title="修改地址"/></a>
												<a   href="ReceivingServlet?rId=${r.rId }"><img src="images/删除评论.png"  valign="middle" title="删除评论"/></a>
											  </c:if>
											</td>
									</tr>
								</c:forEach>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="blank"></div>
	</div>
	<div id="end_div" style="margin-top: -16px;">
		<jsp:include page="end.jsp"></jsp:include>
	</div>
</body>
</html>